<?php /* Smarty version 2.6.18, created on 2016-12-09 15:00:21
         compiled from notice/m.notice.list.tpl.php */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "m.index.header.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<!--头部 end--> 
<!--主体部分-->
<form name="myform" action="" method="get">
<div class="container" style="margin-top:70px;">
  <div class="row" style="margin-top:10px;margin-bottom:20px;">
    <div class="col-sm-12 distance" >
      <div class="form-group">
        <div class="col-sm-10 text-center ">
          <div class="col-xs-6"><a type="button" class="btn btn-primary " href="index.php?a=notice.list">校内事务</a> </div>
          <div class="col-xs-6"><a type="button" class="btn btn-default" href="index.php?a=inform.uplist&inform_type=1">上级通知</a></div>
        </div>
      </div>
    </div>
  </div>
  <div class="row" style="margin-right:10%;">
	<?php if ($this->_tpl_vars['staff_app'] == ''): ?>
	<?php else: ?>
    <div  class="col-xs-sm  text-right" > <a class="btn btn-primary" href="index.php?a=notice.add" style="width:30%">发布</a></div>
	<?php endif; ?>
  </div>
  <!--row  end-->
  
  <div class="row" style="margin-top:10px;">
    <div class="col-sm-12 distance" >
      <div class="form-group">
        <label for="" class="col-sm-2 control-label">标题:</label>
        <div class="col-sm-10">
          <input type="text" class="form-control" value="<?php echo $this->_tpl_vars['notice_title']; ?>
" name="notice_title">
        </div>
      </div>
    </div>
    <div class="col-sm-12 distance" >
      <div class="form-group">
        <label for="" class="col-sm-2 control-label">发布人:</label>
        <div class="col-sm-10">
          <input type="text" class="form-control" value="<?php echo $this->_tpl_vars['staff_name']; ?>
" name="staff_name">
        </div>
      </div>
    </div>
    <div class="col-sm-12 distance" >
      <div class="form-group">
        <label for="" class="col-sm-2 control-label">开始时间:</label>
        <div class="col-sm-10">
          <input type="text" class="form-control" value="<?php echo $this->_tpl_vars['from']; ?>
" id="from" name="from">
        </div>
      </div>
    </div>
    <div class="col-sm-12 distance" >
      <div class="form-group">
        <label for="" class="col-sm-2 control-label">结束时间:</label>
        <div class="col-sm-10">
          <input type="text" class="form-control" value="<?php echo $this->_tpl_vars['to']; ?>
" id="to" name="to">
        </div>
      </div>
    </div>
    <div class="col-xs-12  distance hierarchy2">
      <div class="form-group text-center" style="padding-top:0px;">
	    <input type="hidden" name="a" value="notice.list">
        <button type="submit" class="btn btn-success absolutely">搜索</button>
      </div>
    </div>
  </div>
  <div class="row" style="margin-top:15px;margin-left:1px; margin-right:1px;">
  <?php $_from = $this->_tpl_vars['notice_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
    <table class="table table-striped table-bordered text-center"  id="middles">
      <tr>
        <td>标题</td>
        <td><?php echo $this->_tpl_vars['value']['notice_title']; ?>
</td>
      </tr>
      <tr>
        <td>发布人</td>
        <td><?php echo $this->_tpl_vars['value']['user_name']; ?>
</td>
      </tr>
      <tr>
        <td>发布时间</td>
        <td><?php echo $this->_tpl_vars['value']['create_time']; ?>
</td>
      </tr>
      <tr>
        <td>要求完成时间</td>
        <td><?php echo $this->_tpl_vars['value']['end_time']; ?>
</td>
      </tr>
      <tr>
        <td>完成状态</td>
        <td><?php if ($this->_tpl_vars['value']['is_read'] == 1): ?>完成<?php else: ?>未完成<?php endif; ?></td>
      </tr>
      <tr>
        <td>内部完成时间</td>
        <td><?php echo $this->_tpl_vars['value']['read_time']; ?>
</td>
      </tr>
      <tr>
        <td>操作</td>
        <td >
			<?php if ($this->_tpl_vars['value']['is_show'] == 1): ?>
				<a class="btn btn-success btn-xs" >已完成</a>
			<?php else: ?>
				<a class="btn btn-danger btn-xs" href=""data-toggle="modal" data-target="#myModal" onClick="show('<?php echo $this->_tpl_vars['value']['notice_id']; ?>
')" >完成事务</a>
		    <?php endif; ?>
		</td>
      </tr>      
      <!-- Modal  end -->
    </table>
<?php endforeach; endif; unset($_from); ?>   
  </div>
</div>
</form> 
<!--container  end--> 
<!-- Modal -->
<form name="form2" action="" method="post">
      <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
          <div class="modal-content">
            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
              <h4 class="modal-title" id="myModalLabel"></h4>
            </div>
            <div class="modal-body"> 确定完成吗? </div>
            <!--modal-body-->
            <div class="modal-footer">
			  <input  type="hidden" name="notice_id" value="" id="aaa">	
              <button type="submit" class="btn btn-primary" onclick="c();">保存</button>
			  <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
          </div>
        </div>
      </div>
</form>  
<!--主体部分  end--> 
<!--底部-->
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "m.index.footer.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?> 
<script>
  $(function() {
    $( "#from" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
	  changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#to" ).datepicker( "option", "minDate", selectedDate );
      }
    });
    $( "#to" ).datepicker({
      defaultDate: "+1w",
      changeMonth: true,
      changeYear: true,
      numberOfMonths:1,
      onClose: function( selectedDate ) {
        $( "#from" ).datepicker( "option", "maxDate", selectedDate );
      }
    });
  });
  </script>
<script>
function show(a){
	
	$("#aaa").val(a);
	
	}
</script>